projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08da2f5
)
Tweak the new project template to be more idiomatic.
author
Nick Cameron
<ncameron@mozilla.com>
Thu, 31 Dec 2015 03:12:56 +0000
(16:12 +1300)
committer
Nick Cameron
<ncameron@mozilla.com>
Thu, 31 Dec 2015 03:12:56 +0000
(16:12 +1300)
src/cargo/ops/cargo_new.rs
patch
|
blob
|
history
diff --git
a/src/cargo/ops/cargo_new.rs
b/src/cargo/ops/cargo_new.rs
index 4487f3166b47ede817f691adc071af3af2aed180..cf54e87d90733ef6b3d9f9fe2248573f4ad180ce 100644
(file)
--- a/
src/cargo/ops/cargo_new.rs
+++ b/
src/cargo/ops/cargo_new.rs
@@
-159,8
+159,11
@@
fn main() {
"));
} else {
try!(paths::write(&path.join("src/lib.rs"), b"\
-#[test]
-fn it_works() {
+#[cfg(test)]
+mod test {
+ #[test]
+ fn it_works() {
+ }
}
"));
}